Example 1
shows the source code for the New Entry panel. Add this code to the end of
index.html, before the closing
</body>.
Example 1. The HTML for the New Entry panel
<div id="createEntry"> <div class="toolbar"> <h1>New Entry</h1> <a class="button cancel" href="#">Cancel</a> </div> <form method="post"> <ul class="rounded"> <li><input type="text" placeholder="Food" name="food" id="food" autocapitalize="off" autocorrect="off" autocomplete="off" /></li> <li><input type="text" placeholder="Calories" name="calories" id="calories" autocapitalize="off" autocorrect="off" autocomplete="off" /></li> <li><input type="submit" class="submit" name="action" value="Save Entry" /></li> </ul> </form> </div>
|
Figure 2 shows the New Entry form in
action. At this point, we’ve done nothing to actually save the entry when
the user clicks Save Entry. .